using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using Granite.Xaml.Converters;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Granite.Xaml.Tests.Converters
{

	[TestClass]
	public class FalseToVisibleConverterTests : ConverterTest<FalseToVisibleConverter>
	{

		[TestMethod]
		public void FalseToVisibleConverter_Test()
		{
			Convert(Visibility.Visible, null);
			Convert(Visibility.Visible, null, Visibility.Collapsed);
			Convert(Visibility.Visible, null, Visibility.Hidden);
			Convert(Visibility.Visible, null, "Collapsed");
			Convert(Visibility.Visible, null, "Hidden");

			Convert(Visibility.Visible, false);
			Convert(Visibility.Visible, false, Visibility.Collapsed);
			Convert(Visibility.Visible, false, Visibility.Hidden);
			Convert(Visibility.Visible, false, "Collapsed");
			Convert(Visibility.Visible, false, "Hidden");

			Convert(Visibility.Collapsed, true);
			Convert(Visibility.Collapsed, true, Visibility.Collapsed);
			Convert(Visibility.Hidden, true, Visibility.Hidden);
			Convert(Visibility.Collapsed, true, "Collapsed");
			Convert(Visibility.Hidden, true, "Hidden");

			BadValue(0);
			BadValue("");

			BadTargetType<int>();
			BadTargetType<string>();

			NoConvertBack();
		}
	}
}
